/****************************************************************************
**
** Character.h
**
** Copyright (C) August 2014 Hotride
**
** This program is free software; you can redistribute it and/or modify
** it under the terms of the GNU General Public License as published by
** the Free Software Foundation; either version 2 of the License, or
** (at your option) any later version.
**
** This program is distributed in the hope that it will be useful,
** but WITHOUT ANY WARRANTY; without even the implied warranty of
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
** GNU General Public License for more details.
**
*****************************************************************************
*/
//---------------------------------------------------------------------------
#ifndef CharacterH
#define CharacterH
//--------------------------------------------------------------------------
class TCharacter
{
private:
	TGameObject *m_Player;

	WORD m_Str;
	WORD m_Int;
	WORD m_Dex;

	WORD m_MaxMana;
	WORD m_MaxStam;

	short m_Mana;
	short m_Stam;
	
	WORD m_MaxWeight;
	WORD m_Weight;

	WORD m_Armor;

	DWORD m_Gold;

	bool m_Warmode;

	TSkill *m_Skills;

public:
	TCharacter(TGameObject *player);
	~TCharacter();
	
	SETGET(WORD, Str)
	SETGET(WORD, Int)
	SETGET(WORD, Dex)
	SETGET(WORD, MaxMana)
	SETGET(WORD, MaxStam)
	SETGET(WORD, Mana)
	SETGET(WORD, Stam)
	SETGET(WORD, MaxWeight)
	SETGET(WORD, Weight)
	SETGET(WORD, Armor)
	SETGET(WORD, Gold)
	SETGET(WORD, Warmode)
	
	void SetSkillBaseValue(int index, float val);
	void SetSkillValue(int index, float val);
	void SetSkillCap(int index, float val);
	void SetSkillStatus(int index, BYTE val);
	
	float GetSkillBaseValue(int index) const;
	float GetSkillValue(int index) const;
	float GetSkillCap(int index) const;
	BYTE GetSkillStatus(int index) const;


	
	void SetSerial(DWORD val) {m_Player->SetSerial(val);}
	void SetGraphic(WORD val) {m_Player->SetGraphic(val);}
	void SetColor(WORD val) {m_Player->SetColor(val);}
	void SetX(WORD val) {m_Player->SetX(val);}
	void SetY(WORD val) {m_Player->SetY(val);}
	void SetZ(char val) {m_Player->SetZ(val);}
	void SetMaxHits(short val) {m_Player->SetMaxHits(val);}
	void SetHits(short val) {m_Player->SetHits(val);}
	void SetCount(WORD val) {m_Player->SetCount(val);}
	void SetSex(BYTE val) {m_Player->SetSex(val);}
	void SetLayer(BYTE val) {m_Player->SetLayer(val);}
	void SetFlags(BYTE val) {m_Player->SetFlags(val);}
	void SetDirection(BYTE val) {m_Player->SetDirection(val);}
	void SetNotoriety(BYTE val) {m_Player->SetNotoriety(val);}
	void SetName(string val) {m_Player->SetName(val);}
	
	DWORD GetSerial() const {return m_Player->GetSerial();}
	WORD GetGraphic() const {return m_Player->GetGraphic();}
	WORD GetColor() const {return m_Player->GetColor();}
	WORD GetX() const {return m_Player->GetX();}
	WORD GetY() const {return m_Player->GetY();}
	char GetZ() const {return m_Player->GetZ();}
	short GetMaxHits() const {return m_Player->GetMaxHits();}
	short GetHits() const {return m_Player->GetHits();}
	WORD GetCount() const {return m_Player->GetCount();}
	BYTE GetSex() const {return m_Player->GetSex();}
	BYTE GetLayer() const {return m_Player->GetLayer();}
	BYTE GetFlags() const {return m_Player->GetFlags();}
	BYTE GetDirection() const {return m_Player->GetDirection();}
	BYTE GetNotoriety() const {return m_Player->GetNotoriety();}
	string GetName() const {return m_Player->GetName();}
	
	bool Poisoned() {return (m_Player->Poisoned());}
	bool YellowHits() {return (m_Player->YellowHits());}
	bool Locked() {return (m_Player->Locked());}
	bool InWarMode() {return (m_Player->InWarMode());}
	bool Hidden() {return (m_Player->Hidden());}

	bool Dead() {return m_Player->Dead();}

	TGameObject *FindLayer(int layer) {return m_Player->FindLayer(layer);}
};
//---------------------------------------------------------------------------
#endif